#include "H264FileParser.h"

int Parser_Test()
{
	H264FileParser objH264FileParser;
	int nRet = -1;

	nRet = objH264FileParser.open("..\\testvideo\\test.h264");
	if (nRet != 0)
	{
		printf("H264FileParser open err %d\n", nRet);
		return -1;
	}

	char* szData = NULL;
	int nLen = 0;

	int nCnt = 0;
	AVPacket* pobjAVPacket = NULL;

	while(true)
	{
		nRet = objH264FileParser.getAVPacket(pobjAVPacket);
		if (nRet < 0)
		{
			printf("H264FileParser.getAVPacket end %d\n", nRet);
			break;
		}
		printf("FrameNo:%.3d Len:%d\n", ++nCnt, pobjAVPacket->size);
	}

	return 0;
}
